/* 通用样式 */
:root {
  --primary-color: #fe2c55;
  --secondary-color: #161823;
  --text-color: #161823;
  --light-text: #ffffff;
  --border-color: #e6e6e6;
  --background-color: #f8f8f8;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

/* 顶部区域样式 */
.top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3)), url("bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  padding: 20px;
  border-radius: 0 0 16px 16px;
  box-shadow: var(--shadow);
}

.time {
  align-self: flex-start;
  font-weight: 500;
  margin-bottom: 10px;
  font-size: 16px;
}

.functionButtons {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 15px;
}

.addFriendBtn, .newVisitorBtn {
  padding: 8px 12px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  margin-top: 10px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.addFriendBtn:hover, .newVisitorBtn:hover {
  background-color: rgba(0, 0, 0, 0.7);
  transform: translateY(-2px);
}

.searchIcon, .menuIcon {
  width: 32px;
  height: 32px;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 18px;
  margin-top: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.searchIcon:hover, .menuIcon:hover {
  background-color: rgba(0, 0, 0, 0.6);
  transform: scale(1.1);
}

.phonto {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-top: 10px;
  border: 2px solid white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  object-fit: cover;
}

.avatarAndText {
  display: flex;
  align-items: center;
  margin-top: 10px;
}

.avatarAndText p {
  margin-left: 15px;
  font-size: 18px;
  font-weight: bold;
}

.douyinId {
  font-size: 12px;
  opacity: 0.8;
}

/* 底部区域样式 */
.bottom {
  padding: 15px;
  background-color: var(--background-color);
}

/* 粉丝统计区域 */
.fensi {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  background-color: white;
  padding: 15px 10px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.statItem {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
}

.statItem:hover {
  transform: translateY(-2px);
}

.statNum {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-color);
}

.statLabel {
  font-size: 14px;
  color: #666;
  margin-top: 4px;
}

/* 介绍区域 */
.jsarea {
  width: 100%;
  height: 40px;
  margin-bottom: 15px;
  padding: 10px 15px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background-color: white;
  font-size: 14px;
  resize: none;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.jsarea:focus {
  border-color: var(--primary-color);
  outline: none;
}

/* 标签区域 */
.tagsArea {
  margin-bottom: 15px;
}

.addTagBtn {
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 8px 15px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.addTagBtn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* 抖音商城 */
.shopPromo {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  background-color: white;
  padding: 12px 15px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
}

.shopPromo:hover {
  transform: translateY(-2px);
}

.shopIcon {
  font-size: 24px;
  color: var(--primary-color);
  margin-right: 10px;
}

.shopText {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-color);
}

/* 操作按钮 */
.actionButtons {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.editBtn, .addBtn {
  flex: 1;
  padding: 10px 0;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.editBtn {
  background-color: var(--primary-color);
  color: white;
  margin-right: 10px;
}

.addBtn {
  background-color: white;
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.editBtn:hover, .addBtn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* 内容标签 */
.contentTabs {
  display: flex;
  justify-content: space-around;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 15px;
}

.tabBtn {
  flex: 1;
  padding: 12px 0;
  background-color: transparent;
  border: none;
  font-size: 16px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.activeTab {
  color: var(--primary-color);
}

.activeTab::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* 视频网格 */
.videoGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.videoItem {
  position: relative;
  aspect-ratio: 9/16;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.videoItem:hover {
  transform: scale(1.02);
}

.videoItem img, .videoItem video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playIcon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 30px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewCount {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 粉丝和关注页面样式 */
.pageHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  background-color: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border-color);
}

.pageTitle {
  font-size: 22px;
  font-weight: bold;
  margin: 20px 0;
  padding: 0 20px;
  color: var(--text-color);
}

.friendsList {
  padding: 0 15px;
  margin-bottom: 20px;
}

.FriendsItem {
  display: flex;
  align-items: center;
  padding: 15px;
  background-color: white;
  margin-bottom: 10px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.FriendsItem:hover {
  transform: translateY(-2px);
}

.avatarfriend {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.friendInfo {
  flex: 1;
  margin-left: 15px;
}

.friendInfo h3 {
  font-size: 16px;
  margin: 0 0 5px 0;
  font-weight: 600;
  color: var(--text-color);
}

.friendInfo p {
  font-size: 14px;
  color: #666;
  margin: 0;
  line-height: 1.4;
}

.FriendsItem button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.FriendsItem button:hover {
  background-color: #e6254e;
  transform: scale(1.05);
}

.emptyState {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  color: #999;
  background-color: var(--background-color);
  border-radius: var(--border-radius);
  margin: 20px 0;
  width: 100%;
  text-align: center;
}

.emptyState p {
  margin-top: 15px;
  font-size: 16px;
  font-weight: 500;
}

/* 购物页面样式 */
.shopbox {
  padding: 15px;
  background-color: var(--primary-color);
  box-shadow: var(--shadow);
}

.inputWrapper {
  position: relative;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.inputWrapper:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 0 0 2px rgba(254, 44, 85, 0.2);
}

.seacher {
  width: 100%;
  padding: 10px 15px 10px 40px;
  border-radius: 20px;
  border: none;
  background-color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  box-shadow: var(--shadow);
  outline: none;
}

.seacher:focus {
  background-color: white;
}

.searchIcon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  background-color: transparent;
  border: none;
  width: auto;
  height: auto;
  margin: 0;
}

.icons {
  display: flex;
  justify-content: space-around;
  padding: 15px 10px;
  background-color: white;
  box-shadow: var(--shadow);
  margin-bottom: 15px;
}

.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
}

.icon:hover {
  transform: translateY(-2px);
  color: var(--primary-color);
}

.icon svg {
  font-size: 24px;
  margin-bottom: 5px;
  color: var(--primary-color);
}

.icon p {
  font-size: 12px;
  margin: 5px 0 0 0;
}

.nav {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.nav_content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  padding: 15px;
}

.itemList {
  background-color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  padding-bottom: 10px;
  cursor: pointer;
}

.itemList:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.itemList img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.itemList p {
  margin: 10px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-color);
  line-height: 1.4;
}

.itemList p:nth-child(2) {
  font-weight: bold;
  font-size: 14px;
}

.itemList p:nth-child(3) {
  color: #666;
  font-size: 12px;
  height: 32px;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.itemList p:nth-child(4) {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 12px;
}

.yhadd {
  font-size: 24px;
  color: var(--text-color);
  cursor: pointer;
  transition: var(--transition);
}

.yhadd:hover {
  color: var(--primary-color);
  transform: scale(1.1);
}

/* 响应式调整 */
@media (min-width: 768px) {
  .nav_content {
    grid-template-columns: repeat(3, 1fr);
  }
}